import {ADD_COUNTER, ADD_TO_CART, UPDATE_CHECKD} from './mutations_type'

export default {
  [ADD_COUNTER](state, payload) {
    payload.count++
  },
  [ADD_TO_CART](state, payload) {
    payload.checkd = true
    state.cartList.push(payload)
  },
  [UPDATE_CHECKD](state, payload) {
    state.cartList.forEach(item => item.checkd = payload)
  }
}
